package com.wfcm.service.impl;

import com.wfcm.dao.CourseInvitationDao;
import com.wfcm.entity.CourseInvitation;
import com.wfcm.service.CourseInvitationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: liu
 * @Date: 2018/6/27 16:40
 * @Description: 邀请用户赠送课程
 */
@Service
public class CourseInvitationServiceImpl implements CourseInvitationService {

    @Autowired
    private CourseInvitationDao courseInvitationDao;

    @Override
    public CourseInvitation getCourseInvitation(CourseInvitation ci) {
        return courseInvitationDao.getCourseInvitation(ci);
    }

    @Override
    public Integer addCourseInvitationLog(CourseInvitation ci) {
        return courseInvitationDao.addCourseInvitationLog(ci);
    }

    @Override
    public Boolean confirm(CourseInvitation ci) {
        if (null != courseInvitationDao.confirm(ci)) return false;
        else return true;
    }
}
